module.exports =
`
#ifdef GL_ES
precision lowp float;
#endif

uniform float angle;
uniform float radius;
uniform float screenWidth;
uniform float screenHeight;

varying vec2 v_texCoord;
void main()
{



    vec2 tmp = v_texCoord;

    tmp.x = (tmp.x - 0.5);
    tmp.y = tmp.y - 0.5;
    float len = length(tmp);
    float precent = (radius - len) / radius;
    if(precent < 1.0 && precent >= 0.0)
    {
        float theta = precent * precent * angle;
        // float theta = precent * angle * 8.0;
        float s = sin(theta);
        float c = cos(theta);
        //计算旋转
        tmp.x = tmp.x * c - tmp.y * s ;
        tmp.y = tmp.x * s + tmp.y * c ;
    }
    tmp.x = tmp.x + 0.5;
    tmp.y = tmp.y + 0.5;
    
     
    // float x = tmp.x;
    // tmp.x = tmp.y;
    // tmp.y = x;
    gl_FragColor = texture2D(CC_Texture0, tmp);


    /*
    vec2 uv = fragCoord.xy / iResolution.xy;
	
	float w = (0.5 - (uv.x)) * (iResolution.x / iResolution.y);
    float h = 0.5 - uv.y;
	float distanceFromCenter = sqrt(w * w + h * h);
	
	float sinArg = distanceFromCenter * 10.0 - iTime * 10.0;
	float slope = cos(sinArg) ;
	vec4 color = texture(iChannel0, uv + normalize(vec2(w, h)) * slope * 0.05);
	
	fragColor = color;

    */
}
`

